$(function () {
  var myChart = echarts.init(document.getElementById('c1'));

  // 指定图表的配置项和数据
  var option = {
      title: {
          text: '2019年注册人数'
      },
      tooltip: {},
      legend: {
          data:['人数']
      },
      xAxis: {
          data: ["一月","二月","三月","四月","五月","六月"]
      },
      yAxis: {},
      series: [{
          name: '人数',
          type: 'bar',
          data: [105, 120, 1036, 410, 510, 720]
      }]
  };

  // 使用刚指定的配置项和数据显示图表。
  myChart.setOption(option);


  var myChart = echarts.init(document.getElementById('c2'));

  // 指定图表的配置项和数据
  var option = {
    tooltip: {
      trigger: 'item',
      formatter: "{a} <br/>{b}: {c} ({d}%)"
  },
  legend: {
      orient: 'vertical',
      x: 'left',
      data:['阿迪','耐克','椰子','aj','阿迪王']
  },
  series: [
      {
          name:'访问来源',
          type:'pie',
          radius: ['50%', '70%'],
          avoidLabelOverlap: false,
          label: {
              normal: {
                  show: false,
                  position: 'center'
              },
              emphasis: {
                  show: true,
                  textStyle: {
                      fontSize: '30',
                      fontWeight: 'bold'
                  }
              }
          },
          labelLine: {
              normal: {
                  show: false
              }
          },
          data:[
              {value:335, name:'阿迪'},
              {value:310, name:'耐克'},
              {value:234, name:'椰子'},
              {value:135, name:'aj'},
              {value:1548, name:'阿迪王'}
          ]
      }
  ]
  };

  // 使用刚指定的配置项和数据显示图表。
  myChart.setOption(option);
})